<h2>DESCRIPTION</h2>

<p><em>r.resamp.stats</em> fills a grid cell (raster) matrix with
aggregated values generated from a set of input layer data points.

<p>Without the <em>-w</em> switch, the aggregate is computed over all of
the input cells whose centers lie within the output cell.

<p>With the <em>-w</em> switch, the aggregate uses the values from all
input cells which intersect the output cell, weighted according to the
proportion of the source cell which lies inside the output cell. This
is slower, but produces a more accurate result.


<h2>NOTES</h2>

<p>Resampling modules (<em>r.resample, r.resamp.stats, r.resamp.interp,
r.resamp.rst</em>) resample the map to match the current region settings.

<p>The notion of weighting doesn't make any sense for the min and max
aggregates. However, the <em>-w</em> flag still has significance in
that, when multiple destination cells overlap a source cell, the
source cell is included in the calculation of all of the destination
cells.

<h2>EXAMPLE</h2>

<p>Resample elevation raster map to a lower resolution (from 6m to 20m;
North Carolina sample dataset):


<div class="code"><pre>
g.region raster=el_D782_6m -p
g.region res=20 -ap
# from 6m to 20m: weighted resampling -w
r.resamp.stats -w input=el_D782_6m output=el_D782_20m
</pre></div>

<center>
<img src="r_resamp_stats_6m_20m.png" alt="GRASS r.resamp.stats result (subset)" border=0>
<br>
<i>Resampling of 6m DEM (left) to 20m DEM (right) with weighted resampling (subset)</i>
</center>

<h2>SEE ALSO</h2>

<em>
<a href="g.region.html">g.region</a>,
<a href="r.resample.html">r.resample</a>,
<a href="r.resamp.rst.html">r.resamp.rst</a>,
<a href="r.resamp.filter.html">r.resamp.filter</a>,
<a href="r.resamp.interp.html">r.resamp.interp</a>,
<a href="r.neighbors.html">r.neighbors</a>
</em>

<p>
Overview: <a href="https://grasswiki.osgeo.org/wiki/Interpolation">Interpolation and Resampling</a> in GRASS GIS
<p>
Examples how statistical functions are applied can be found in the <a href="r.neighbors.html">r.neighbors</a> module documentation.

<h2>AUTHOR</h2>

Glynn Clements

<!--
<p>
<i>Last changed: $Date$</i>
-->
